<?php
/**
 * @user:andy
 * @date:2021/8/1
 * @company:http://www.sjdphp.com
 * @desc:
 */

namespace app\admin\validate;


use think\Validate;

class BoroughsValidate extends Validate
{
    protected $rule = [
        'boroughs_id'   => 'require|number',
        'boroughs_name' => 'require',
    ];

    protected $message = [
        'boroughs_id.require' => '行政ID不能为空',
        'boroughs_id.number'  => '行政ID格式错误',
        'boroughs_name.require' => '行政名称不能为空',
    ];

    protected $scene = [
        'add'  => ['boroughs_name'],
        'edit' => ['boroughs_name','boroughs_id'],
    ];
}